/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Util;

import java.awt.Color;
import java.awt.Component;
import javax.swing.JList;
import javax.swing.JTextArea;
import javax.swing.ListCellRenderer;
import javax.swing.border.BevelBorder;

/**
 *
 * @author Maryluz
 */
public class MiRendererDeLista extends JTextArea
        implements ListCellRenderer {


    @Override
    public Component getListCellRendererComponent(
            JList lista, Object valor, int indice,
            boolean seleccionado, boolean conFoco) {

        // setBorder( new BevelBorder( BevelBorder.RAISED ) );
        // Presenta el text correspondiente al item
        setText(valor.toString());
        // Pinta en los colores indicados y con la fuente seleccionada...
        
        
        setBackground(new Color(Integer.parseInt(getText() ,16)));
        setForeground(new Color(Integer.parseInt(getText(), 16)));
            
        return (this);
    }
}